package com.jtkj.action;

import java.io.PrintWriter;

import javax.faces.application.Application;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

public class DuQuAction extends ActionSupport {

	private static final long serialVersionUID = 1L;

	@Override
	public String execute() throws Exception {
		
		HttpServletRequest request = ServletActionContext.getRequest();
		HttpServletResponse response = ServletActionContext.getResponse();
		
		response.setContentType("text/xml;charset=UTF-8");
		response.setHeader("Cache-Control", "no-cache");
		
		PrintWriter out = response.getWriter();
		StringBuffer sb = new StringBuffer();
		
		String timp_content=(String)ServletActionContext.getServletContext().getAttribute("suoYou_content");
		
		sb.append("<Lists>");
			
			sb.append("<app_content>");
			sb.append(timp_content);
			sb.append("</app_content>");
			
		sb.append("</Lists>");
		
		out.print(sb.toString());
		out.close();
		return "success";
	}

	
	
	
}
